A public type describing a surface fitter z = s(x,y)
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | bc | = | OUTSIDE_NEAREST_BND | ||
| real(kind=RKIND), | public, | allocatable | :: | c(:) | |||
| real(kind=RKIND), | public | :: | fp | = | zero | ||
| integer, | public | :: | iopt | = | 0 | ||
| integer, | public, | allocatable | :: | iwrk(:) | |||
| integer, | public | :: | knots(2) | = | 0 | ||
| real(kind=RKIND), | public | :: | left(2) |
Interval boundaries |
|||
| integer, | public | :: | liwrk | = | 0 | ||
| integer, | public | :: | lwrk1 | = | 0 | ||
| integer, | public | :: | lwrk2 | = | 0 | ||
| integer, | public | :: | m | = | 0 |
The data points |
|
| integer, | public | :: | nest(2) | = | 0 | ||
| integer, | public | :: | nmax | = | 0 | ||
| integer, | public | :: | order(2) | = | 3 |
Spline degree |
|
| real(kind=RKIND), | public | :: | right(2) |
Interval boundaries |
|||
| real(kind=RKIND), | public | :: | smoothing | = | 1000.d0 | ||
| real(kind=RKIND), | public, | allocatable | :: | t(:,:) | |||
| real(kind=RKIND), | public, | allocatable | :: | w(:) | |||
| real(kind=RKIND), | public, | allocatable | :: | wrk1(:) | |||
| real(kind=RKIND), | public, | allocatable | :: | wrk2(:) | |||
| real(kind=RKIND), | public, | allocatable | :: | x(:) | |||
| real(kind=RKIND), | public, | allocatable | :: | y(:) | |||
| real(kind=RKIND), | public, | allocatable | :: | z(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=RKIND), | intent(in) | :: | x(:) | |||
| real(kind=RKIND), | intent(in) | :: | y(size(x)) | |||
| real(kind=RKIND), | intent(in) | :: | z(size(x)) | |||
| real(kind=RKIND), | intent(in), | optional | :: | w(size(x)) | ||
| integer, | intent(out), | optional | :: | ierr |
Clean memory
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(fitpack_surface), | intent(inout) | :: | this |
Generate/update fitting curve, with optional smoothing
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(fitpack_surface), | intent(inout) | :: | this | |||
| real(kind=RKIND), | intent(in), | optional | :: | smoothing | ||
| integer, | intent(in), | optional | :: | order |
Generate new fit
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(fitpack_surface), | intent(inout) | :: | this | |||
| real(kind=RKIND), | intent(in) | :: | x(:) | |||
| real(kind=RKIND), | intent(in) | :: | y(size(x)) | |||
| real(kind=RKIND), | intent(in) | :: | z(size(x)) | |||
| real(kind=RKIND), | intent(in), | optional | :: | w(size(x)) | ||
| real(kind=RKIND), | intent(in), | optional | :: | smoothing | ||
| integer, | intent(in), | optional | :: | order |
Set new points
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(fitpack_surface), | intent(inout) | :: | this | |||
| real(kind=RKIND), | intent(in) | :: | x(:) | |||
| real(kind=RKIND), | intent(in) | :: | y(size(x)) | |||
| real(kind=RKIND), | intent(in) | :: | z(size(x)) | |||
| real(kind=RKIND), | intent(in), | optional | :: | w(size(x)) |
type :: fitpack_surface !> The data points integer :: m = 0 real(RKIND), allocatable :: x(:),y(:),z(:) !> Spline degree integer :: order(2) = 3 !> Interval boundaries real(RKIND) :: left(2),right(2) ! Node weights real(RKIND), allocatable :: w(:) ! Estimated and actual number of knots and their allocations integer :: nest(2) = 0 integer :: nmax = 0 integer :: lwrk1 = 0, lwrk2 = 0, liwrk = 0 integer, allocatable :: iwrk(:) real(RKIND), allocatable :: wrk1(:),wrk2(:) ! Curve fit smoothing parameter (fit vs. points MSE) real(RKIND) :: smoothing = 1000.d0 ! Actual curve MSE real(RKIND) :: fp = zero ! Curve extrapolation behavior integer :: bc = OUTSIDE_NEAREST_BND ! Knots integer :: knots(2) = 0 real(RKIND), allocatable :: t(:,:) ! Knot locations (:,1)=x; (:,2)=y ! Spline coefficients [knots-order-1] real(RKIND), allocatable :: c(:) ! Runtime flag integer :: iopt = 0 contains !> Clean memory procedure :: destroy => surf_destroy !> Set new points procedure :: new_points => surf_new_points !> Generate new fit procedure :: new_fit => surf_new_fit !> Generate/update fitting curve, with optional smoothing procedure :: fit => surface_fit_automatic_knots end type fitpack_surface